<!--#
##
#	Project: PHPDISK File Storage Solution
#	This is NOT a freeware, use is subject to license terms.
#
#	Site: http://www.phpdisk.com
#
#	$Id: templates.tpl.html 2 2011-05-27 03:00:17Z along $
#
#	Copyright (C) 2008-2012 PHPDisk Team. All Rights Reserved.
#
##
#-->
<?php !defined('IN_PHPDISK') && exit('[PHPDisk] Access Denied!'); ?>
<div id="container">
<!--#if($action =='tpl_detail'){#-->
<h1><?=__('tpl_title')?></h1>
<div class="tips_box"><img class="img_light" src="images/light.gif" align="absmiddle"> <b><?=__('tips')?>: </b>
<span class="txtgray"><?=__('template_tips')?></span>
</div>
<!--#
if(count($tpl_arr)){
	for($i=0;$i<count($tpl_arr['size']);$i++){
		$tpl_name = $tpl_arr['name'][$i];
		$tpl_s_name = $tpl_arr['name'][$i].".tpl.php";
		$tpl_size = $tpl_arr['size'][$i];
#-->
<div style="border-bottom:1px #CCCCCC dotted; padding:5px;" onmouseover="this.className='color4 bold'" onmouseout="this.className=''">
<div style="float:left; width:400px">
	<!--#if($actived){#-->
	<a href="{#urr(ADMINCP,"item=templates&action={{$action}}&task=make_one&tpl_id=$tpl_id&tpl_name={{$tpl_name}}")#}">{$tpl_s_name} </a> ({$tpl_size})
	<!--#}else{#-->
	{$tpl_s_name} ({$tpl_size})
	<!--#}#-->
</div>
<!--#if($can_modify){#-->
<div style="float:left; width:100px;">
	<!--#if($actived){#-->
	<a href="{#urr(ADMINCP,"item=templates&action=edit&tpl_id={{$tpl_id}}&tpl_name={{$tpl_name}}")#}"><?=__('modify')?></a>
	<!--#}#-->
</div>
<!--#}#-->
<div style="float:left; width:100px;">
<!--#if($actived){#-->
<a href="{#urr(ADMINCP,"item=templates&action={{$action}}&tpl_id={{$tpl_id}}&task=make_one&tpl_name={{$tpl_name}}")#}"><?=__('tpl_update')?></a>
<!--#}#-->
</div>
<div class="clear"></div>	
</div>
<!--#
	}
}
unset($tpl_arr);
#-->
<br /><br />
<div>
<!--#if($actived){#-->
<input type="button" class="btn" value="<?=__('tpl_make_all')?>" onclick="go('{#urr(ADMINCP,"item=templates&action={{$action}}&tpl_id={{$tpl_id}}&task=make_all")#}')" />
<!--#}#-->
</div>
</div>
<!--#}elseif($action =='edit'){#-->
<h1><?=__('tpl_edit_title')?></h1>
<div class="tips_box"><img class="img_light" src="images/light.gif" align="absmiddle"> <b><?=__('tips')?>: </b>
<span class="txtgray"><?=__('tpl_edit_tips')?></span>
</div>
<div style="padding:10px">
<div><?=__('current_tpl')?>: {$tpl_name_current}</div>
<form action="{#urr(ADMINCP,"item=templates")#}" method="post">
<input type="hidden" name="action" value="{$action}" />
<input type="hidden" name="task" value="{$action}" />
<input type="hidden" name="tpl_name" value="{$tpl_name}" />
<input type="hidden" name="tpl_id" value="{$tpl_id}" />
<textarea name="content" id="content" style="height:320px; width:700px">{$content}</textarea>
	<a href="javascript:void(0);" onclick="resize_textarea('content','plus');">[+]</a> <a href="javascript:void(0);" onclick="resize_textarea('content','sub');">[-]</a><br /><br />
<input type="submit" class="btn" value="<?=__('btn_submit')?>" onclick="return confirm('<?=__('tpl_confirm')?>');" {$disabled} />
<input type="button" class="btn" value="<?=__('btn_back')?>" onclick="javascript:history.back();" />
</form>
</div>
</div>
</div>
<!--#}else{#-->
<h1><?=__('tpl_title')?><!--#sitemap_tag(__('tpl_title'));#--></h1>
<div class="tips_box"><img class="img_light" src="images/light.gif" align="absmiddle"> <b><?=__('tips')?>: </b>
<span class="txtgray"><?=__('template_tips')?></span>
</div>
<table align="center" width="98%" cellpadding="0" cellspacing="0" border="0" class="td_line">
<tr>
	<td class="bold" width="180"><?=__('tpl_snapshot')?></td>
	<td class="bold" width="120"><?=__('style_dir')?></td>
	<td class="bold" width="50%"><?=__('tpl_des')?></td>
	<td class="bold" align="right" width="60"><?=__('operation')?></td>
</tr>
<!--#
if(count($templates_arr)){
	foreach($templates_arr as $k => $v){
		$color = ($k%2 ==0) ? 'color1' :'color4';
		$tpl_type = (trim($v['tpl_type']) =='admin') ? "<span class='txtgreen'>(".__('admin_tpl').")</span>" : "<span class='txtblue'>(".__('user_tpl').")</span>";
#-->
<tr class="{$color}">
	<td><a href="{#urr(ADMINCP,"item=templates&action=tpl_detail&tpl_id=".$v['tpl_dir'])#}"><img src="templates/{$v['tpl_dir']}/images/snapshot.gif" align="absmiddle" border="0" style="margin-bottom:8px"  /><br />{$v['tpl_title']}</a></td>
	<td>{$v['tpl_dir']}{$tpl_type}</td>
	<td>
	<table>
		<tr>
			<td>{$v['tpl_desc']}</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td>	
				<span class="txtgray"><?=__('tpl_author')?>:</span><a href="{$v['tpl_site']}" target="_blank">{$v['tpl_author']}</a>&nbsp;
				<span class="txtgray"><?=__('tpl_version')?>:{$v['tpl_version']}</span>&nbsp;
				<span class="txtgray"><?=__('phpdisk_core')?>:{$v['phpdisk_core']}</span>
			</td>
		</tr>
	</table>
	</td>
	<td align="right">
	<!--# if($v['actived']){#-->
	<span class="txtgray"><?=__('actived_tpl')?></span>
	<!--# }else{#-->
	<a href="{#urr(ADMINCP,"item=templates&tpl_id=".$v['tpl_dir']."&action=active")#}" class="txtblue"><?=__('set_active_tpl')?></a>
	<!--#}#-->
	</td>
</tr>
<!--#
	}
	unset($templates_arr);
}
#-->
</table>
<!--#}#-->
</div>